<?php 
namespace Admin\Controller;
use Think\Controller;

class CommentController extends AdminController{

	public function indexshop(){
		
		$shop = M("shop");
		$list = $shop ->select();
        $Page = new\Think\Page($count,5);
        $show = $Page->show();
		$this->assign('list',$list);
        $this->assign('page',$show);
		$this->display();
}
    public function indexgood(){
    	$good = M("shop_goods");
    	$map['shop_goods.spuid']=array('eq',$_GET['id']);
        $Page = new\Think\Page($count,5);
        $show = $Page->show();
    	$list=$good->join('spu_sku on shop_goods.spuid = spu_sku.spuid', 'left')
                ->join('goodsdetail on spu_sku.skuid = goodsdetail.skuid', 'left')
                ->join('shop on shop_goods.shopid=shop.id','left')
                ->join('goods_sku on spu_sku.skuid=goods_sku.skuid','left')
                ->join('proval on goods_sku.provalid=proval.id')
                ->where($map)->select();
    	$this->assign('list',$list);
        $this->assign('page',$show);
    	$this->display();
    }
    public function indexcomment(){
    	$comment = M("comment");
        $comm = D("comment");
    	$map['comment.skuid']=array('eq',$_GET['skuid']);
        $Page = new\Think\Page($count,5);
        $show = $Page->show();
    	$list = $comment->join('homeuser on comment.uid = homeuser.id','left')->join('orderdetail on comment.skuid = orderdetail.skuid','left')->where($map)->select();
        $result=$comm->comm();
        $this->assign('comm',$result);
    	$this->assign('list',$list);
        $this->assign('Page',$show);
    	$this->display();
    }
}
